package ua.gov.energy.vkek.iceline.acct.radius;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;


@Entity
@Table(uniqueConstraints =
@UniqueConstraint(columnNames = {"name"}))
@SequenceGenerator(name = "seq_attr", sequenceName = "seq_attr", allocationSize = 1)
public class Attribute implements Serializable {

    @Id
    @GeneratedValue(generator = "seq_attr")
    private int id;
    //
    private String name;
    //
    private String description;

    //<editor-fold defaultstate="collapsed" desc="simple get/set and override object methods">
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 61 * hash + (this.name != null ? this.name.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Attribute other = (Attribute) obj;
        return true;
    }
    //</editor-fold>
}
